<template>
  <div class="card-wrap p-[16px] bg-white rounded-[8px] bg-[var(--base-color)]">
    <div class="flex items-center justify-between">
      <FromTitle style="margin-bottom: 2px" v-if="title" :title="title" />
      <slot name="right"></slot>
    </div>
    <slot></slot>
  </div>
</template>

<script setup>
import FromTitle from '@/components/XForm/FormTitle.vue'

defineProps({
  title: {
    type: String,
    default: "",
  },
})
</script>

<style lang="scss">
.card-wrap {
  & + .card-wrap {
    margin-top: 8px;
  }
}
</style>
